<!doctype html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport"
        content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>Hello APP</title>
    <link rel="stylesheet" type="text/css" href="./css/api.css" />
    <style type="text/css">

    </style>
</head>

<body>

</body>
<script type="text/javascript" src="./script/api.js"></script>
<script type="text/javascript" src="script/zepto.min.js"></script>
<script type="text/javascript" src="script/hb.js"></script>
<script type="text/javascript">
    apiready = function () {
        api.openWin({
            name: 'main',
            url: './html/main.html',
            slidBackEnabled: false
        });

        /***   
        // 判断是否为第一次进入，打开欢迎页
        if ($api.getStorage('firstStart')) {
            api.closeFrameGroup({
                name: 'welcomepage'
            });
        } else {
            api.openFrameGroup({
                name: 'welcomepage',
                rect: {
                    x: 0,
                    y: 0,
                    w: 'auto',
                    h: 'auto'
                },
                frames: [{
                    name: 'welcome_1',
                    url: './html/welcome_1.html',
//                  hScrollBarEnabled: true,
                }, {
                    name: 'welcome_2',
                    url: './html/welcome_2.html',
//                  hScrollBarEnabled: true,
                }, {
                    name: 'welcome_3',
                    url: './html/welcome_3.html',
//                  hScrollBarEnabled: false,
                }]
            }, function (res, err) {

                 
            })

        }

        **/
        api.addEventListener({
            name: 'offline'
        }, function (ret, err) {
            toast('当前网络缓慢或无网络..');
        });
        api.addEventListener({
            name: 'online'
        }, function (ret, err) {
            toast('网络已恢复');
        });
    };
</script>

</html>